//author:kakake
var Model = /** @class */ (function () {
    function Model() {
    }
    return Model;
}());

//author:kakake
var Common = /** @class */ (function () {
    function Common() {
    }
    return Common;
}());

//author:kakake
var tscnmedmaterialController = /** @class */ (function () {
    function tscnmedmaterialController() {
        this.data = {
            dbConn: TSLobsterAPI.Program.GetDbConn()
        };
    }
    //获取中药材数据
    tscnmedmaterialController.prototype.getMedMaterialdata = function () {
        var drugName = TSLobsterAPI.Program.RequestQuery('drugName', '');
        var pageInfo = {
            key: "药材名称",
            page: TSLobsterAPI.Program.RequestQuery('page', 0),
            perPage: TSLobsterAPI.Program.RequestQuery('limit', 10),
            totalRecord: 0,
            totalPage: 0
        };
        var strsql = "";
        strsql = "SELECT 药材名称,药材别名,药材基原,性味归经,功能主治,isnull(注意事项,'') 注意事项,isnull(主要药用类别,'') 主要药用类别,标准来源,页码 \
         FROM [中药材(中国药典2020年版)]  where [药材名称] like @drugName ";
        var dbparams = {
            drugName: '%' + drugName + '%'
        };
        //获取分页Sql和条数
        var list = TSLobsterAPI.DbHelper.DbGetJsonData(this.data.dbConn, strsql, dbparams, pageInfo);
        return { list: list, count: pageInfo.totalRecord };
    };
    return tscnmedmaterialController;
}());

//author:kakake
var tscnmedmaterialService = /** @class */ (function () {
    function tscnmedmaterialService() {
    }
    return tscnmedmaterialService;
}());

//author:kakake
var tscnmedmaterialDao = /** @class */ (function () {
    function tscnmedmaterialDao() {
        this.dbConn = TSLobsterAPI.Program.GetDbConn();
    }
    return tscnmedmaterialDao;
}());

